<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> -->
    <meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">
    <title>图片/视频/文件上传</title>
	<script>document.write('<script src="../../plugin/vue/js/import.js?' + Math.random() + '"><' + '/script>');</script>
    <script>_import("../../plugin/vue/js/before.js");</script>
</head>
<body>
   	<div id="app" class="w-vdbox" v-cloak>
   	<div class="panel-heading w-mobel-title"><h3 class="panel-title tc"><i class="fl el-icon-arrow-left"></i> 图片/视频/文件上传 </h3> </div>
    <el-form ref="form"  label-width="50px">    
        <el-form-item label="标题:">       
            <el-input v-model="title"></el-input>
           
        </el-form-item>
        <el-form-item label="描述:">       
            <el-input type="textarea" v-model="rmk"></el-input>
           
        </el-form-item>
        <el-form-item label="" > 
			<div class="w-vdupload">
	            <ul class="el-upload-list el-upload-list--picture-card">
	              <template v-for="item in fileData">
	              	 <li class="el-upload-list__item" v-if="getType(item)==0">
		                <img :src="'../../'+item.file_path" :alt="item.file_name" class="el-upload-list__item-thumbnail" :title="item.file_name" >              
		                <span class="el-upload-list__item-actions">
		                  <span class="el-upload-list__item-preview" title="查看" @click="view(item,0)"><i class="el-icon-zoom-in"></i></span>
		                  <span class="el-upload-list__item-delete" title="下载" @click="download(item)"><i class="el-icon-download"></i></span>
		                  <span class="el-upload-list__item-delete" title="删除" @click="del(item)"><i class="el-icon-delete"></i></span>
		                </span>
	              	 </li>
	              	 <li class="el-upload-list__item" v-if="getType(item)==1">
		                <i class="el-icon-video-play" @click="view(item,1)" :title="item.file_name"></i>
		                <span class="el-upload-list__item-actions">
		                  <span class="el-upload-list__item-preview" title="查看" @click="view(item,1)"><i class="el-icon-zoom-in"></i></span>
		                  <span class="el-upload-list__item-delete" title="下载" @click="download(item)"><i class="el-icon-download"></i></span>
		                  <span class="el-upload-list__item-delete" title="删除" @click="del(item)"><i class="el-icon-delete"></i></span>
		                </span>
	              	 </li>
	              	 <li class="el-upload-list__item" v-if="getType(item)==2">
		                <i class="el-icon-folder" :title="item.file_name" ></i>
		                <span class="el-upload-list__item-actions">
		                  <span class="el-upload-list__item-delete" title="下载" @click="download(item)"><i class="el-icon-download"></i></span>
		                  <span class="el-upload-list__item-delete" title="删除" @click="del(item)"><i class="el-icon-delete"></i></span>
		                </span>
	              	 </li>
	              </template>	                           
	            </ul>
	            <el-upload tabindex="0" class="el-upload el-upload--picture-card"
					    :action="uploadUrl"
					    ref="upload"	   
					    :show-file-list="false" 
					    :on-success="handleFileSuccess" 
					    :on-error="handleFileError"
					    :before-upload="beforeUploadFile" 
					    :on-progress="uploadFileProcess"
					    :data="data">			             
						<i class="el-icon-plus"></i><em class="el-upload__text">文件上传</em>	            
	            </el-upload>
          	</div>               
        </el-form-item>
        <el-dialog :visible.sync="showDialog" destroy-on-close="true" >
  			<img v-if="isPic" width="100%" :src="media_src" alt=""/>
  			<video  v-else controls="controls"  class="player" preload="auto" width="100%"  :src="media_src"  :type="media_type">
                                                    您的浏览器不支持html5! <!-- :poster="poster" -->
            </video>
		</el-dialog>
        <div class="w-tc">
		    <el-button type="primary" @Click="save">保存</el-button>
		    <el-button type="primary" @click="back">返回</el-button>
		  </el-form-item>
      </el-form>
     </div>

</body>

<script>
     _import("../../plugin/vue/js/after.js?type=0");
</script>  
 <script>
     _import("../../plugin/vue/js/progressDialog.js"); 	
</script>  
<script>
     _import("js/upfile.js");
</script>

</html>